<template>
    <!--点击  发布测评 ===的选项卡头部  是跳转的页面-->
    <div>
        <el-tabs v-model="activeName1" @tab-click="handleClick">
            <el-tab-pane label="测评概要" name="first">
                  <template>
                      <ZxReleaseHouseDetail></ZxReleaseHouseDetail>
                  </template>
            </el-tab-pane>
            <el-tab-pane label="区域" name="second">
                <template>
                    <ZxReleaseHouseArea></ZxReleaseHouseArea>
                </template>
            </el-tab-pane>
            <el-tab-pane label="户型" name="third">
                <template>
                    <ZxReleaseHouseModel></ZxReleaseHouseModel>
                </template>
            </el-tab-pane>
            <el-tab-pane label="价格" name="fourth">
                <template>
                    <ZxReleaseHousePrice></ZxReleaseHousePrice>
                </template>
            </el-tab-pane>
            <el-tab-pane label="配套" name="five">
                <template>
                    <ZxReleaseHouseSet></ZxReleaseHouseSet>
                </template>
            </el-tab-pane>
            <el-tab-pane label="环境" name="six">
                <template>
                    <ZxReleaseHouseEnvironment></ZxReleaseHouseEnvironment>
                </template>
            </el-tab-pane>
            <el-tab-pane label="预览报告" name="seven">
                <template>
                    <ZxReleaseHouseTestLook></ZxReleaseHouseTestLook>
                </template>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
    import ZxReleaseHouseDetail from '../components/ZxReleaseHouseDetail'
    import ZxReleaseHouseArea from '../components/ZxReleaseHouseArea'
    import ZxReleaseHouseModel from '../components/ZxReleaseHouseModel'
    import ZxReleaseHousePrice from '../components/ZxReleaseHousePrice'
    import ZxReleaseHouseSet from '../components/ZxReleaseHouseSet'
    import ZxReleaseHouseEnvironment from '../components/ZxReleaseHouseEnvironment'
    import ZxReleaseHouseTestLook from '../components/ZxReleaseHouseTestLook'
    export default {
        name: "ZxReleaseHouseTest",
        components:{
            ZxReleaseHouseDetail,
            ZxReleaseHouseArea,
            ZxReleaseHouseModel,
            ZxReleaseHousePrice,
            ZxReleaseHouseSet,
            ZxReleaseHouseEnvironment,
            ZxReleaseHouseTestLook
        },
        data() {
            return {
                activeName:this.$store.state.MenuCount.activeName
            };
        },
        computed:{
            activeName1:{
                get(){/*这里取得VUEX的数据*/
                    /*state取VUEx里面的数据*/
                    /*   console.log(this.$store.state.MenuCount.activeName)*/
                    return this.$store.state.MenuCount.activeName
                },
                set(value){/*这里VUEX的数据发送出去*/
                    this.$store.commit('changactiveName',value)
                }
            }
        },
        methods: {
            handleClick() {
               /* console.log(tab.name);*/
                /*这里是存VUEX里面的数据*/
                this.$store.dispatch('changactiveN', this.activeName)
            },

        }
    }
</script>

<style scoped>

</style>